﻿using Dora.Services.AdminUser.Dto.QueryDto;
using Dora.Services.AdminUser.Entities;
using Dora.Tools.Utility.Const;
using Surging.Core.Common;
using Surging.Core.CPlatform.Ioc;
using Surging.Core.CPlatform.Runtime.Server.Implementation.ServiceDiscovery.Attributes;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Dora.Services.AdminUser.IApplication
{
    /// <summary>
    /// 大社设置表服务接口
    /// </summary>
    [ServiceBundle("api/" + DoraModuleName.AdminUser + "/{Service}")]
    public interface IOrgBigSettingService : IServiceKey
    {
        /// <summary>
        /// 根据Id获取一个实体对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "根据Id获取一个实体对象")]
        Task<OrgBigSettingEntity> GetById(int id);

        /// <summary>
        /// 根据Id获取赠品设置
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "jikun", Name = "根据Id获取一个实体对象")]
        Task<List<OrgGiftSettingEntity>> GetGitfById(int id);
        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "分页获取数据")]
        Task<PageDataList<OrgBigSettingEntity>> GetPageList(OrgBigSettingQueryDto input);
        
        /// <summary>
        /// 根据IdList获取列表
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        [Service(Date = "2019-05-31", Director = "TTTan", Name = "根据IdList获取列表")]
        Task<List<OrgBigSettingEntity>> GetList(List<int> idList);

        /// <summary>
        /// 初始化大社设置
        /// </summary>
        /// <returns></returns>
        [Service(Date = "2019-06-03", Director = "TTTan", Name = "获取所有")]
        Task<OrgBigSettingEntity> Init(int orgId);

        /// <summary>
        /// 修改订单归属门店
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-03", Director = "TTTan", Name = "修改订单归属门店")]
        Task<ResultDto> UpdateOrderSetting(OrgBigSettingEntity entity);

        /// <summary>
        /// 修改产品设置
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-06-03", Director = "TTTan", Name = "修改产品设置")]
        Task<ResultDto> UpdateProdSetting(OrgSettingDto dto);


        /// <summary>
        /// 小程序AppId及秘钥设置
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-26", Director = "gll", Name = "微信AppId及秘钥设置")]
        Task<ResultDto> UpdateWxAppSetting(OrgBigSettingEntity entity);

        /// <summary>
        /// 根据产品类型ID获取赠品配置信息
        /// </summary>
        /// <param name="orgid">跟组织机构ID</param>
        /// <param name="id">产品类型ID</param>
        /// <returns></returns>
        [Service(Date = "2019-11-12", Director = "jik", Name = "根据产品类型ID获取赠品配置信息")]
        Task<ResultDto<OrgGiftSettingEntity>> GetSettingByTypeId(int orgid, int id);
        /// <summary>
        /// 更新机构是否审核电子合同
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-11-27", Director = "jik", Name = "更新机构是否审核电子合同")]
        Task<ResultDto> UpdateEConSetting(OrgBigSettingEntity entity);
    }
}
